﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RaytracerLib.RenderableObjects;
using RaytracerLib.Rays;

namespace RaytracerLib.SpatialSubdivisioners
{
    public abstract class SpatialSubdivisioner
    {
        protected Scene m_scene;
        protected int m_max_ray_depth;

        protected SpatialSubdivisioner(Scene a_scene)
        {
            m_scene = a_scene;
            m_max_ray_depth = a_scene.ActiveCamera.Film.MaxRayDepth;
        }

        public abstract void BuildSpatialSubdivision();
        public abstract RenderableObject FindOuterObject(Ray a_ray);
        public abstract Intersection HitTest(Intersection a_source_ray_intersection, Ray a_ray);
        public abstract RenderableObject FindOuterObject(Intersection a_intersection);
    }
}
